package com.yicong.taxi.config;

import android.os.Build;
import android.os.StrictMode;
import android.support.annotation.RequiresApi;
import android.support.multidex.MultiDex;
import android.support.multidex.MultiDexApplication;

import com.github.anzewei.parallaxbacklayout.ParallaxHelper;
import com.hjq.toast.ToastUtils;

public class MyApp extends MultiDexApplication {
    private static MyApp mInstance;
    @RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN_MR2) @Override
    public void onCreate() {
        super.onCreate();
        mInstance = this;
        //突破应用总方法数65,536限制
        MultiDex.install(this);
        //实现注册Activity生命周期回调(滑动返回)
        registerActivityLifecycleCallbacks(ParallaxHelper.getInstance());

        //初始化吐司
        ToastUtils.init(this);
        //分享调用App图片
        StrictMode.VmPolicy.Builder builder = new StrictMode.VmPolicy.Builder();
        StrictMode.setVmPolicy(builder.build());
        builder.detectFileUriExposure();
//        //初始化Zxing
//        ZXingLibrary.initDisplayOpinion(this);
//        //签到日历屏幕自适应
//        ResolutionUtil.getInstance().init(this);
    }
    public static MyApp getInstance() {
        return mInstance;
    }

    public static String db="mssql";
}
